

# def func(s):
#     al_num = 0
#     space_num = 0
#     digit_num = 0
#     other_num = 0
#     for i in s:
#         if i.isdigit():
#             digit_num += 1
#         elif i.isspace():
#             space_num += 1
#         elif i.isalpha():
#             al_num += 1
#         else:
#             other_num += 1
#     return al_num, space_num, digit_num, other_num
# result = func("falfaofwfjlas665DdGGSF SFGS 5SG S6GS 下")
# print(result)


# def func(s, lis, tup):
#     zifuchuan = len(s)
#     liebiao = len(lis)
#     yuanzu = len(tup)
#
#     if zifuchuan > 5:
#         print("大于5")
#     else:
#         print("小于5")
#     if liebiao > 5:
#         print("大于5")
#     else:
#         print("小于5")
#     if yuanzu > 5:
#         print("大于5")
#     else:
#         print("小于5")
#     return zifuchuan, liebiao, yuanzu
# func("house", ["house", 0.9], ("house", 0.9))

# def func(n):
#     for i in n:
#         i = str(i)
#         if '' in i:
#             return'空格：', i
#         else:
#             return ("没空格")
# a = ('dalfajfa afka', 'da')
# res = func(a)
# print(res)

# def func(li):
#     len_li = len(li)
#     if len_li > 2:
#         print("列表长度大于2")
#         new_li = li[0:2]
#         return new_li
#     return li
# res = func([12, 12, 45, 78, 32, 12])
# print(res)

# def func(li, tup):
#     for i in range(len(li)):
#         if i % 2 == 1:
#             li.append(li[i])
#     print(li)
#     for j in range(len(tup)):
#         if j % 2 == 1:
#             tup.append(tup[j])  #报错，元组无法添加元素
#     print(tup)
#
#     return li, tup
# res = func([1, 2, 3, 4, 5, 6, 7, 8, 9], (1, 2, 3, 11, 21, 4, 5, 6, 7))
# print(res)

def func(strr):
    digit_number = 0
    space_number = 0
    alpha_number = 0
    else_number = 0
    for i in strr:
        if i.isdigit():
            digit_number += 1
        elif i.isspace():
            space_number += 1
        elif i.isalpha():
            alpha_number += 1
        else:
            else_number += 1
    return "数字，空格，字母，其他内容分别有：", digit_number, space_number, alpha_number, else_number
res = func("sda!@#$%^&11234567dfghj da da")
print(res)














